package com.atguigu.gulimall.coupon;

import com.alibaba.nacos.api.annotation.NacosProperties;
import com.alibaba.nacos.spring.context.annotation.config.EnableNacosConfig;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySources;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;


@SpringBootApplication
@MapperScan("com.atguigu.gulimall.coupon.dao")
@EnableDiscoveryClient
//nacos相关配置，这里写的是需要读取的文件
@NacosPropertySources(value = {
        @NacosPropertySource(dataId = "gulimall-coupon.properties"),
        @NacosPropertySource(dataId = "application.properties")
})
@EnableNacosConfig(globalProperties = @NacosProperties(serverAddr = "localhost:8848", namespace = "gulimall-coupon"))
public class GulimallCouponApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallCouponApplication.class, args);
    }

}
